/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this value object you may modify the generated sub-class of this class - VOInvoiceMaster.as.
 */

package com.model.valueObjects
{
import com.adobe.fiber.services.IFiberManagingService;
import com.adobe.fiber.util.FiberUtils;
import com.adobe.fiber.valueobjects.IValueObject;
import flash.events.Event;
import flash.events.EventDispatcher;
import mx.binding.utils.ChangeWatcher;
import mx.events.PropertyChangeEvent;
import mx.validators.ValidationResult;

import flash.net.registerClassAlias;
import flash.net.getClassByAlias;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

use namespace model_internal;

[ExcludeClass]
public class _Super_VOInvoiceMaster extends flash.events.EventDispatcher implements com.adobe.fiber.valueobjects.IValueObject
{
    model_internal static function initRemoteClassAliasSingle(cz:Class) : void
    {
        try
        {
            if (flash.net.getClassByAlias("VOInvoiceMaster") == null)
            {
                flash.net.registerClassAlias("VOInvoiceMaster", cz);
            }
        }
        catch (e:Error)
        {
            flash.net.registerClassAlias("VOInvoiceMaster", cz);
        }
    }

    model_internal static function initRemoteClassAliasAllRelated() : void
    {
    }

    model_internal var _dminternal_model : _VOInvoiceMasterEntityMetadata;

    /**
     * properties
     */
    private var _internal_folderd : String;
    private var _internal_catagory_id : String;
    private var _internal_catagory : String;
    private var _internal_return_flag : Boolean;
    private var _internal_tax2 : Number;
    private var _internal_tax1 : Number;
    private var _internal_location : String;
    private var _internal_exp_type_id : int;
    private var _internal_customer : String;
    private var _internal_project_code_id : int;
    private var _internal_tax3 : Number;
    private var _internal_billable : Boolean;
    private var _internal_amount : Number;
    private var _internal_bill_paid : Boolean;
    private var _internal_split_flag : Boolean;
    private var _internal_user_id : int;
    private var _internal_additional_tax : Number;
    private var _internal_vendor : String;
    private var _internal_modify_date : String;
    private var _internal_category_id : int;
    private var _internal_vendor_id : int;
    private var _internal_tax_claim : Boolean;
    private var _internal_location_id : int;
    private var _internal_folder : String;
    private var _internal_tax_catagory : int;
    private var _internal_folder_id : int;
    private var _internal_category : Object;
    private var _internal_company_paid : Boolean;
    private var _internal_isSelected : Boolean;
    private var _internal_tran_date : String;
    private var _internal_entry_date : String;
    private var _internal_invoice_no : int;
    private var _internal_user : String;
    private var _internal_payment_type : String;
    private var _internal_customer_id : int;
    private var _internal_payment_type_id : int;

    private static var emptyArray:Array = new Array();

    // Change this value according to your application's floating-point precision
    private static var epsilon:Number = 0.0001;

    /**
     * derived property cache initialization
     */
    model_internal var _cacheInitialized_isValid:Boolean = false;

    model_internal var _changeWatcherArray:Array = new Array();

    public function _Super_VOInvoiceMaster()
    {
        _model = new _VOInvoiceMasterEntityMetadata(this);

        // Bind to own data properties for cache invalidation triggering
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "folderd", model_internal::setterListenerFolderd));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "catagory_id", model_internal::setterListenerCatagory_id));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "catagory", model_internal::setterListenerCatagory));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "location", model_internal::setterListenerLocation));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "customer", model_internal::setterListenerCustomer));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "vendor", model_internal::setterListenerVendor));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "modify_date", model_internal::setterListenerModify_date));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "folder", model_internal::setterListenerFolder));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "category", model_internal::setterListenerCategory));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "tran_date", model_internal::setterListenerTran_date));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "entry_date", model_internal::setterListenerEntry_date));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "user", model_internal::setterListenerUser));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "payment_type", model_internal::setterListenerPayment_type));

    }

    /**
     * data property getters
     */

    [Bindable(event="propertyChange")]
    public function get folderd() : String
    {
        return _internal_folderd;
    }

    [Bindable(event="propertyChange")]
    public function get catagory_id() : String
    {
        return _internal_catagory_id;
    }

    [Bindable(event="propertyChange")]
    public function get catagory() : String
    {
        return _internal_catagory;
    }

    [Bindable(event="propertyChange")]
    public function get return_flag() : Boolean
    {
        return _internal_return_flag;
    }

    [Bindable(event="propertyChange")]
    public function get tax2() : Number
    {
        return _internal_tax2;
    }

    [Bindable(event="propertyChange")]
    public function get tax1() : Number
    {
        return _internal_tax1;
    }

    [Bindable(event="propertyChange")]
    public function get location() : String
    {
        return _internal_location;
    }

    [Bindable(event="propertyChange")]
    public function get exp_type_id() : int
    {
        return _internal_exp_type_id;
    }

    [Bindable(event="propertyChange")]
    public function get customer() : String
    {
        return _internal_customer;
    }

    [Bindable(event="propertyChange")]
    public function get project_code_id() : int
    {
        return _internal_project_code_id;
    }

    [Bindable(event="propertyChange")]
    public function get tax3() : Number
    {
        return _internal_tax3;
    }

    [Bindable(event="propertyChange")]
    public function get billable() : Boolean
    {
        return _internal_billable;
    }

    [Bindable(event="propertyChange")]
    public function get amount() : Number
    {
        return _internal_amount;
    }

    [Bindable(event="propertyChange")]
    public function get bill_paid() : Boolean
    {
        return _internal_bill_paid;
    }

    [Bindable(event="propertyChange")]
    public function get split_flag() : Boolean
    {
        return _internal_split_flag;
    }

    [Bindable(event="propertyChange")]
    public function get user_id() : int
    {
        return _internal_user_id;
    }

    [Bindable(event="propertyChange")]
    public function get additional_tax() : Number
    {
        return _internal_additional_tax;
    }

    [Bindable(event="propertyChange")]
    public function get vendor() : String
    {
        return _internal_vendor;
    }

    [Bindable(event="propertyChange")]
    public function get modify_date() : String
    {
        return _internal_modify_date;
    }

    [Bindable(event="propertyChange")]
    public function get category_id() : int
    {
        return _internal_category_id;
    }

    [Bindable(event="propertyChange")]
    public function get vendor_id() : int
    {
        return _internal_vendor_id;
    }

    [Bindable(event="propertyChange")]
    public function get tax_claim() : Boolean
    {
        return _internal_tax_claim;
    }

    [Bindable(event="propertyChange")]
    public function get location_id() : int
    {
        return _internal_location_id;
    }

    [Bindable(event="propertyChange")]
    public function get folder() : String
    {
        return _internal_folder;
    }

    [Bindable(event="propertyChange")]
    public function get tax_catagory() : int
    {
        return _internal_tax_catagory;
    }

    [Bindable(event="propertyChange")]
    public function get folder_id() : int
    {
        return _internal_folder_id;
    }

    [Bindable(event="propertyChange")]
    public function get category() : Object
    {
        return _internal_category;
    }

    [Bindable(event="propertyChange")]
    public function get company_paid() : Boolean
    {
        return _internal_company_paid;
    }

    [Bindable(event="propertyChange")]
    public function get isSelected() : Boolean
    {
        return _internal_isSelected;
    }

    [Bindable(event="propertyChange")]
    public function get tran_date() : String
    {
        return _internal_tran_date;
    }

    [Bindable(event="propertyChange")]
    public function get entry_date() : String
    {
        return _internal_entry_date;
    }

    [Bindable(event="propertyChange")]
    public function get invoice_no() : int
    {
        return _internal_invoice_no;
    }

    [Bindable(event="propertyChange")]
    public function get user() : String
    {
        return _internal_user;
    }

    [Bindable(event="propertyChange")]
    public function get payment_type() : String
    {
        return _internal_payment_type;
    }

    [Bindable(event="propertyChange")]
    public function get customer_id() : int
    {
        return _internal_customer_id;
    }

    [Bindable(event="propertyChange")]
    public function get payment_type_id() : int
    {
        return _internal_payment_type_id;
    }

    /**
     * data property setters
     */

    public function set folderd(value:String) : void
    {
        var oldValue:String = _internal_folderd;
        if (oldValue !== value)
        {
            _internal_folderd = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "folderd", oldValue, _internal_folderd));
        }
    }

    public function set catagory_id(value:String) : void
    {
        var oldValue:String = _internal_catagory_id;
        if (oldValue !== value)
        {
            _internal_catagory_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "catagory_id", oldValue, _internal_catagory_id));
        }
    }

    public function set catagory(value:String) : void
    {
        var oldValue:String = _internal_catagory;
        if (oldValue !== value)
        {
            _internal_catagory = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "catagory", oldValue, _internal_catagory));
        }
    }

    public function set return_flag(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_return_flag;
        if (oldValue !== value)
        {
            _internal_return_flag = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "return_flag", oldValue, _internal_return_flag));
        }
    }

    public function set tax2(value:Number) : void
    {
        var oldValue:Number = _internal_tax2;
        if (isNaN(_internal_tax2) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_tax2 = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tax2", oldValue, _internal_tax2));
        }
    }

    public function set tax1(value:Number) : void
    {
        var oldValue:Number = _internal_tax1;
        if (isNaN(_internal_tax1) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_tax1 = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tax1", oldValue, _internal_tax1));
        }
    }

    public function set location(value:String) : void
    {
        var oldValue:String = _internal_location;
        if (oldValue !== value)
        {
            _internal_location = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "location", oldValue, _internal_location));
        }
    }

    public function set exp_type_id(value:int) : void
    {
        var oldValue:int = _internal_exp_type_id;
        if (oldValue !== value)
        {
            _internal_exp_type_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "exp_type_id", oldValue, _internal_exp_type_id));
        }
    }

    public function set customer(value:String) : void
    {
        var oldValue:String = _internal_customer;
        if (oldValue !== value)
        {
            _internal_customer = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "customer", oldValue, _internal_customer));
        }
    }

    public function set project_code_id(value:int) : void
    {
        var oldValue:int = _internal_project_code_id;
        if (oldValue !== value)
        {
            _internal_project_code_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "project_code_id", oldValue, _internal_project_code_id));
        }
    }

    public function set tax3(value:Number) : void
    {
        var oldValue:Number = _internal_tax3;
        if (isNaN(_internal_tax3) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_tax3 = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tax3", oldValue, _internal_tax3));
        }
    }

    public function set billable(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_billable;
        if (oldValue !== value)
        {
            _internal_billable = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "billable", oldValue, _internal_billable));
        }
    }

    public function set amount(value:Number) : void
    {
        var oldValue:Number = _internal_amount;
        if (isNaN(_internal_amount) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_amount = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "amount", oldValue, _internal_amount));
        }
    }

    public function set bill_paid(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_bill_paid;
        if (oldValue !== value)
        {
            _internal_bill_paid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "bill_paid", oldValue, _internal_bill_paid));
        }
    }

    public function set split_flag(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_split_flag;
        if (oldValue !== value)
        {
            _internal_split_flag = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "split_flag", oldValue, _internal_split_flag));
        }
    }

    public function set user_id(value:int) : void
    {
        var oldValue:int = _internal_user_id;
        if (oldValue !== value)
        {
            _internal_user_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_id", oldValue, _internal_user_id));
        }
    }

    public function set additional_tax(value:Number) : void
    {
        var oldValue:Number = _internal_additional_tax;
        if (isNaN(_internal_additional_tax) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_additional_tax = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "additional_tax", oldValue, _internal_additional_tax));
        }
    }

    public function set vendor(value:String) : void
    {
        var oldValue:String = _internal_vendor;
        if (oldValue !== value)
        {
            _internal_vendor = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vendor", oldValue, _internal_vendor));
        }
    }

    public function set modify_date(value:String) : void
    {
        var oldValue:String = _internal_modify_date;
        if (oldValue !== value)
        {
            _internal_modify_date = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "modify_date", oldValue, _internal_modify_date));
        }
    }

    public function set category_id(value:int) : void
    {
        var oldValue:int = _internal_category_id;
        if (oldValue !== value)
        {
            _internal_category_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "category_id", oldValue, _internal_category_id));
        }
    }

    public function set vendor_id(value:int) : void
    {
        var oldValue:int = _internal_vendor_id;
        if (oldValue !== value)
        {
            _internal_vendor_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vendor_id", oldValue, _internal_vendor_id));
        }
    }

    public function set tax_claim(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_tax_claim;
        if (oldValue !== value)
        {
            _internal_tax_claim = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tax_claim", oldValue, _internal_tax_claim));
        }
    }

    public function set location_id(value:int) : void
    {
        var oldValue:int = _internal_location_id;
        if (oldValue !== value)
        {
            _internal_location_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "location_id", oldValue, _internal_location_id));
        }
    }

    public function set folder(value:String) : void
    {
        var oldValue:String = _internal_folder;
        if (oldValue !== value)
        {
            _internal_folder = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "folder", oldValue, _internal_folder));
        }
    }

    public function set tax_catagory(value:int) : void
    {
        var oldValue:int = _internal_tax_catagory;
        if (oldValue !== value)
        {
            _internal_tax_catagory = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tax_catagory", oldValue, _internal_tax_catagory));
        }
    }

    public function set folder_id(value:int) : void
    {
        var oldValue:int = _internal_folder_id;
        if (oldValue !== value)
        {
            _internal_folder_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "folder_id", oldValue, _internal_folder_id));
        }
    }

    public function set category(value:Object) : void
    {
        var oldValue:Object = _internal_category;
        if (oldValue !== value)
        {
            _internal_category = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "category", oldValue, _internal_category));
        }
    }

    public function set company_paid(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_company_paid;
        if (oldValue !== value)
        {
            _internal_company_paid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "company_paid", oldValue, _internal_company_paid));
        }
    }

    public function set isSelected(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_isSelected;
        if (oldValue !== value)
        {
            _internal_isSelected = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "isSelected", oldValue, _internal_isSelected));
        }
    }

    public function set tran_date(value:String) : void
    {
        var oldValue:String = _internal_tran_date;
        if (oldValue !== value)
        {
            _internal_tran_date = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tran_date", oldValue, _internal_tran_date));
        }
    }

    public function set entry_date(value:String) : void
    {
        var oldValue:String = _internal_entry_date;
        if (oldValue !== value)
        {
            _internal_entry_date = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "entry_date", oldValue, _internal_entry_date));
        }
    }

    public function set invoice_no(value:int) : void
    {
        var oldValue:int = _internal_invoice_no;
        if (oldValue !== value)
        {
            _internal_invoice_no = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "invoice_no", oldValue, _internal_invoice_no));
        }
    }

    public function set user(value:String) : void
    {
        var oldValue:String = _internal_user;
        if (oldValue !== value)
        {
            _internal_user = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user", oldValue, _internal_user));
        }
    }

    public function set payment_type(value:String) : void
    {
        var oldValue:String = _internal_payment_type;
        if (oldValue !== value)
        {
            _internal_payment_type = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "payment_type", oldValue, _internal_payment_type));
        }
    }

    public function set customer_id(value:int) : void
    {
        var oldValue:int = _internal_customer_id;
        if (oldValue !== value)
        {
            _internal_customer_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "customer_id", oldValue, _internal_customer_id));
        }
    }

    public function set payment_type_id(value:int) : void
    {
        var oldValue:int = _internal_payment_type_id;
        if (oldValue !== value)
        {
            _internal_payment_type_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "payment_type_id", oldValue, _internal_payment_type_id));
        }
    }

    /**
     * Data property setter listeners
     *
     * Each data property whose value affects other properties or the validity of the entity
     * needs to invalidate all previously calculated artifacts. These include:
     *  - any derived properties or constraints that reference the given data property.
     *  - any availability guards (variant expressions) that reference the given data property.
     *  - any style validations, message tokens or guards that reference the given data property.
     *  - the validity of the property (and the containing entity) if the given data property has a length restriction.
     *  - the validity of the property (and the containing entity) if the given data property is required.
     */

    model_internal function setterListenerFolderd(value:flash.events.Event):void
    {
        _model.invalidateDependentOnFolderd();
    }

    model_internal function setterListenerCatagory_id(value:flash.events.Event):void
    {
        _model.invalidateDependentOnCatagory_id();
    }

    model_internal function setterListenerCatagory(value:flash.events.Event):void
    {
        _model.invalidateDependentOnCatagory();
    }

    model_internal function setterListenerLocation(value:flash.events.Event):void
    {
        _model.invalidateDependentOnLocation();
    }

    model_internal function setterListenerCustomer(value:flash.events.Event):void
    {
        _model.invalidateDependentOnCustomer();
    }

    model_internal function setterListenerVendor(value:flash.events.Event):void
    {
        _model.invalidateDependentOnVendor();
    }

    model_internal function setterListenerModify_date(value:flash.events.Event):void
    {
        _model.invalidateDependentOnModify_date();
    }

    model_internal function setterListenerFolder(value:flash.events.Event):void
    {
        _model.invalidateDependentOnFolder();
    }

    model_internal function setterListenerCategory(value:flash.events.Event):void
    {
        _model.invalidateDependentOnCategory();
    }

    model_internal function setterListenerTran_date(value:flash.events.Event):void
    {
        _model.invalidateDependentOnTran_date();
    }

    model_internal function setterListenerEntry_date(value:flash.events.Event):void
    {
        _model.invalidateDependentOnEntry_date();
    }

    model_internal function setterListenerUser(value:flash.events.Event):void
    {
        _model.invalidateDependentOnUser();
    }

    model_internal function setterListenerPayment_type(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPayment_type();
    }


    /**
     * valid related derived properties
     */
    model_internal var _isValid : Boolean;
    model_internal var _invalidConstraints:Array = new Array();
    model_internal var _validationFailureMessages:Array = new Array();

    /**
     * derived property calculators
     */

    /**
     * isValid calculator
     */
    model_internal function calculateIsValid():Boolean
    {
        var violatedConsts:Array = new Array();
        var validationFailureMessages:Array = new Array();

        var propertyValidity:Boolean = true;
        if (!_model.folderdIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_folderdValidationFailureMessages);
        }
        if (!_model.catagory_idIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_catagory_idValidationFailureMessages);
        }
        if (!_model.catagoryIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_catagoryValidationFailureMessages);
        }
        if (!_model.locationIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_locationValidationFailureMessages);
        }
        if (!_model.customerIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_customerValidationFailureMessages);
        }
        if (!_model.vendorIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_vendorValidationFailureMessages);
        }
        if (!_model.modify_dateIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_modify_dateValidationFailureMessages);
        }
        if (!_model.folderIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_folderValidationFailureMessages);
        }
        if (!_model.categoryIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_categoryValidationFailureMessages);
        }
        if (!_model.tran_dateIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_tran_dateValidationFailureMessages);
        }
        if (!_model.entry_dateIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_entry_dateValidationFailureMessages);
        }
        if (!_model.userIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_userValidationFailureMessages);
        }
        if (!_model.payment_typeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_payment_typeValidationFailureMessages);
        }

        model_internal::_cacheInitialized_isValid = true;
        model_internal::invalidConstraints_der = violatedConsts;
        model_internal::validationFailureMessages_der = validationFailureMessages;
        return violatedConsts.length == 0 && propertyValidity;
    }

    /**
     * derived property setters
     */

    model_internal function set isValid_der(value:Boolean) : void
    {
        var oldValue:Boolean = model_internal::_isValid;
        if (oldValue !== value)
        {
            model_internal::_isValid = value;
            _model.model_internal::fireChangeEvent("isValid", oldValue, model_internal::_isValid);
        }
    }

    /**
     * derived property getters
     */

    [Transient]
    [Bindable(event="propertyChange")]
    public function get _model() : _VOInvoiceMasterEntityMetadata
    {
        return model_internal::_dminternal_model;
    }

    public function set _model(value : _VOInvoiceMasterEntityMetadata) : void
    {
        var oldValue : _VOInvoiceMasterEntityMetadata = model_internal::_dminternal_model;
        if (oldValue !== value)
        {
            model_internal::_dminternal_model = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "_model", oldValue, model_internal::_dminternal_model));
        }
    }

    /**
     * methods
     */


    /**
     *  services
     */
    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagingService):void
    {
        _managingService = managingService;
    }

    model_internal function set invalidConstraints_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invalidConstraints;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_invalidConstraints = value;
            _model.model_internal::fireChangeEvent("invalidConstraints", oldValue, model_internal::_invalidConstraints);
        }
    }

    model_internal function set validationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_validationFailureMessages;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_validationFailureMessages = value;
            _model.model_internal::fireChangeEvent("validationFailureMessages", oldValue, model_internal::_validationFailureMessages);
        }
    }

    model_internal var _doValidationCacheOfFolderd : Array = null;
    model_internal var _doValidationLastValOfFolderd : String;

    model_internal function _doValidationForFolderd(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfFolderd != null && model_internal::_doValidationLastValOfFolderd == value)
           return model_internal::_doValidationCacheOfFolderd ;

        _model.model_internal::_folderdIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isFolderdAvailable && _internal_folderd == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "folderd is required"));
        }

        model_internal::_doValidationCacheOfFolderd = validationFailures;
        model_internal::_doValidationLastValOfFolderd = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfCatagory_id : Array = null;
    model_internal var _doValidationLastValOfCatagory_id : String;

    model_internal function _doValidationForCatagory_id(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfCatagory_id != null && model_internal::_doValidationLastValOfCatagory_id == value)
           return model_internal::_doValidationCacheOfCatagory_id ;

        _model.model_internal::_catagory_idIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isCatagory_idAvailable && _internal_catagory_id == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "catagory_id is required"));
        }

        model_internal::_doValidationCacheOfCatagory_id = validationFailures;
        model_internal::_doValidationLastValOfCatagory_id = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfCatagory : Array = null;
    model_internal var _doValidationLastValOfCatagory : String;

    model_internal function _doValidationForCatagory(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfCatagory != null && model_internal::_doValidationLastValOfCatagory == value)
           return model_internal::_doValidationCacheOfCatagory ;

        _model.model_internal::_catagoryIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isCatagoryAvailable && _internal_catagory == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "catagory is required"));
        }

        model_internal::_doValidationCacheOfCatagory = validationFailures;
        model_internal::_doValidationLastValOfCatagory = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfLocation : Array = null;
    model_internal var _doValidationLastValOfLocation : String;

    model_internal function _doValidationForLocation(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfLocation != null && model_internal::_doValidationLastValOfLocation == value)
           return model_internal::_doValidationCacheOfLocation ;

        _model.model_internal::_locationIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isLocationAvailable && _internal_location == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "location is required"));
        }

        model_internal::_doValidationCacheOfLocation = validationFailures;
        model_internal::_doValidationLastValOfLocation = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfCustomer : Array = null;
    model_internal var _doValidationLastValOfCustomer : String;

    model_internal function _doValidationForCustomer(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfCustomer != null && model_internal::_doValidationLastValOfCustomer == value)
           return model_internal::_doValidationCacheOfCustomer ;

        _model.model_internal::_customerIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isCustomerAvailable && _internal_customer == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "customer is required"));
        }

        model_internal::_doValidationCacheOfCustomer = validationFailures;
        model_internal::_doValidationLastValOfCustomer = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfVendor : Array = null;
    model_internal var _doValidationLastValOfVendor : String;

    model_internal function _doValidationForVendor(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfVendor != null && model_internal::_doValidationLastValOfVendor == value)
           return model_internal::_doValidationCacheOfVendor ;

        _model.model_internal::_vendorIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isVendorAvailable && _internal_vendor == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "vendor is required"));
        }

        model_internal::_doValidationCacheOfVendor = validationFailures;
        model_internal::_doValidationLastValOfVendor = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfModify_date : Array = null;
    model_internal var _doValidationLastValOfModify_date : String;

    model_internal function _doValidationForModify_date(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfModify_date != null && model_internal::_doValidationLastValOfModify_date == value)
           return model_internal::_doValidationCacheOfModify_date ;

        _model.model_internal::_modify_dateIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isModify_dateAvailable && _internal_modify_date == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "modify_date is required"));
        }

        model_internal::_doValidationCacheOfModify_date = validationFailures;
        model_internal::_doValidationLastValOfModify_date = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfFolder : Array = null;
    model_internal var _doValidationLastValOfFolder : String;

    model_internal function _doValidationForFolder(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfFolder != null && model_internal::_doValidationLastValOfFolder == value)
           return model_internal::_doValidationCacheOfFolder ;

        _model.model_internal::_folderIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isFolderAvailable && _internal_folder == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "folder is required"));
        }

        model_internal::_doValidationCacheOfFolder = validationFailures;
        model_internal::_doValidationLastValOfFolder = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfCategory : Array = null;
    model_internal var _doValidationLastValOfCategory : Object;

    model_internal function _doValidationForCategory(valueIn:Object):Array
    {
        var value : Object = valueIn as Object;

        if (model_internal::_doValidationCacheOfCategory != null && model_internal::_doValidationLastValOfCategory == value)
           return model_internal::_doValidationCacheOfCategory ;

        _model.model_internal::_categoryIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isCategoryAvailable && _internal_category == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "category is required"));
        }

        model_internal::_doValidationCacheOfCategory = validationFailures;
        model_internal::_doValidationLastValOfCategory = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfTran_date : Array = null;
    model_internal var _doValidationLastValOfTran_date : String;

    model_internal function _doValidationForTran_date(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfTran_date != null && model_internal::_doValidationLastValOfTran_date == value)
           return model_internal::_doValidationCacheOfTran_date ;

        _model.model_internal::_tran_dateIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isTran_dateAvailable && _internal_tran_date == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "tran_date is required"));
        }

        model_internal::_doValidationCacheOfTran_date = validationFailures;
        model_internal::_doValidationLastValOfTran_date = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEntry_date : Array = null;
    model_internal var _doValidationLastValOfEntry_date : String;

    model_internal function _doValidationForEntry_date(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfEntry_date != null && model_internal::_doValidationLastValOfEntry_date == value)
           return model_internal::_doValidationCacheOfEntry_date ;

        _model.model_internal::_entry_dateIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEntry_dateAvailable && _internal_entry_date == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "entry_date is required"));
        }

        model_internal::_doValidationCacheOfEntry_date = validationFailures;
        model_internal::_doValidationLastValOfEntry_date = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfUser : Array = null;
    model_internal var _doValidationLastValOfUser : String;

    model_internal function _doValidationForUser(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfUser != null && model_internal::_doValidationLastValOfUser == value)
           return model_internal::_doValidationCacheOfUser ;

        _model.model_internal::_userIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUserAvailable && _internal_user == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "user is required"));
        }

        model_internal::_doValidationCacheOfUser = validationFailures;
        model_internal::_doValidationLastValOfUser = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPayment_type : Array = null;
    model_internal var _doValidationLastValOfPayment_type : String;

    model_internal function _doValidationForPayment_type(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPayment_type != null && model_internal::_doValidationLastValOfPayment_type == value)
           return model_internal::_doValidationCacheOfPayment_type ;

        _model.model_internal::_payment_typeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPayment_typeAvailable && _internal_payment_type == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "payment_type is required"));
        }

        model_internal::_doValidationCacheOfPayment_type = validationFailures;
        model_internal::_doValidationLastValOfPayment_type = value;

        return validationFailures;
    }
    

}

}
